* {
  box-sizing: border-box;
}

body {
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(to bottom, #eafbff 50%, #5290f9 50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav {
  display: flex;
  width: 80px;
  height: 66px;
  line-height: 66px;
  background-color: white;
  transition: width 0.6s linear;
  border-radius: 3px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 淡淡的阴影效果 */
}

.nav.active {
  width: 350px;
}

.active ul {
  width: 300px;
}

ul {
  width: 0;
  display: flex;
  padding: 0;
  margin: 0;
  transition: width 0.6s linear;
}

li {
  list-style-type: none;
  margin-left: 25px;
  font-weight: 400;
  font-size: 15px;
  opacity: 0;
  transform: rotateY(0deg);
  transition: transform 0.6s linear, opacity 0.6s linear;
  cursor: pointer;
}

.active li {
  opacity: 1;
  transform: rotateY(360deg);
}

.toggle {
  width: 35px;
  height: 66px;
  /* border: 1px solid red; */
  margin-left: 25px;
  position: relative;
  color: #5290f9;
  cursor: pointer;
}

.line {
  position: absolute;
  font-weight: 700;
  font-size: 20px;
}

.line1 {
  top: -3px;
  left: 13px;
  transform: rotate(90deg) translateY(0px);
  transition: transform 0.6s linear;
}

.line2 {
  top: 3px;
  left: 13px;
  transform: rotate(90deg) translateY(0px);
  transition: transform 0.6s linear;
}

.active .line1 {
  left: 0;
  transform: rotate(-765deg) translateY(2.5px);
}

.active .line2 {
  left: 0;
  transform: rotate(765deg) translateY(-5.5px);
}
